package com.mars.basic.controller.testcontroller;


import com.mars.basic.allmain.po.Role;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/getList")
    public List<Role> getList(){
        List<Role> roles = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            Role role = new Role();
            role.setId(i);
            role.setName(i+"号机器人");
            role.setStatus("-1");
            role.setCreateTime(new Date());
            roles.add(role);
        }
        return roles;
    }
}
